﻿using System;

namespace ReadyApps.Wiki
{
    /// <summary>
    /// Provides the common functionality for a page request to a wiki control.
    /// </summary>
    /// <remarks>
    /// This interface exists to assist in testing the ReadyApps objects.
    /// </remarks>
    interface IWikiPageRequest
    {
        /// <summary>
        /// Gets the name of the virtual wiki site in the data source that the page
        /// request is using.
        /// </summary>
        string SiteName { get; }

        /// <summary>
        /// Gets the fully qualified base folder to provide relative references for
        /// the page request.
        /// </summary>
        string BaseFolder { get; }

        /// <summary>
        /// Gets the name of the requested folder relative to the base folder for
        /// the page request.
        /// </summary>
        string RequestedFolder { get; }

        /// <summary>
        /// Gets the name of the requested page.
        /// </summary>
        string RequestedPage { get; }

        /// <summary>
        /// Gets the username of the currently logged in user accessing the page.
        /// </summary>
        string CurrentUsername { get; }

        bool IsPostBack { get; }

        /// <summary>
        /// Gets the full folder path to the requested page without the page name.
        /// </summary>
        /// <returns>The full path to the requested page beginning and ending with a "/"
        /// and excluding the page name</returns>
        string GetFullPath();
    }
}
